package day02;

public class prime3 {
	public static void main(String[] args) {
		int n;
		int count = 0;
		for (n = 2; n < 1000; n++) {
			int i;
			for (i = 2; i < n; i++) {
				if (n % i == 0)
					break;
			}
			if (i >= n) {
				System.out.print(n + "\t");
				count++;
				if (count % 5 == 0) {
					System.out.println();
				}				
			}


			if (count == 50) {
				System.out.print("总数="+count);
				break;
			}	
		}
	}

}
